﻿@model IEnumerable<MVCHelloworld.Models.Book>

@{
 ViewBag.Title = "图书列表 - MvcBook";
}

<h2>图书列表</h2>

<p>
 @Html.ActionLink("增加图书", "Create")
</p>
<table>
<tr>
<th>
图书名称
</th>
<th>
作者
</th>
<th>
出版社
</th>
<th>
价格
</th>
<th>
备注
</th>
<th></th>
</tr>

@foreach (var item in Model) {
<tr>
<td>
 @Html.DisplayFor(modelItem => item.BookName)
</td>
<td>
 @Html.DisplayFor(modelItem => item.Author)
</td>
<td>
 @Html.DisplayFor(modelItem => item.Publisher)
</td>
<td>
 @Html.DisplayFor(modelItem => item.Price)
</td>
<td>
 @Html.DisplayFor(modelItem => item.Remark)
</td>
<td>
 @Html.ActionLink("编辑", "Edit", new { id=item.BookID }) |
 @Html.ActionLink("查看", "Details", new { id=item.BookID }) |
 @Html.ActionLink("删除", "Delete", new { id=item.BookID })
</td>
</tr>
}

</table>